package com.zhangjianling.sysuser.sevice.impl;

import com.zhangjianling.sysuser.entity.SysUser;
import com.zhangjianling.sysuser.repository.SysUserRepository;
import com.zhangjianling.sysuser.sevice.SysUserService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

/**
 * @Auther: zhangjl
 * @Date: 18/11/1 12:12
 * @Description:
 */
@Service
@Transactional
public class SysUserServiceImpl implements SysUserService {
    @Resource
    private SysUserRepository sysUserRepository;
    @Override
    public void saveUser(SysUser user) {
        try{
            sysUserRepository.save(user);
        }catch (Exception e){
            throw new RuntimeException();
        }
    }
}
